package com.sparrow.core.asm;

import javax.tools.*;
import java.io.IOException;

@SuppressWarnings("rawtypes")
public class ClassFileManager extends ForwardingJavaFileManager {
	public JavaClassFileObject getJavaClassObject() {
		return jclassObject;
	}

	private JavaClassFileObject jclassObject;

	@SuppressWarnings("unchecked")
	public ClassFileManager(StandardJavaFileManager standardManager) {
		super(standardManager);
	}

	@Override
	public JavaFileObject getJavaFileForOutput(Location location,
			String className, JavaFileObject.Kind kind, FileObject sibling)
			throws IOException {
		jclassObject = new JavaClassFileObject(className, kind);
		return jclassObject;
	}

}
